<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GCharsetConverter</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="conversion.html" title="Data conversion">
<link rel="prev" href="GConverter.html" title="GConverter">
<link rel="next" href="GZlibCompressor.html" title="GZlibCompressor">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GConverter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="conversion.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="GZlibCompressor.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GCharsetConverter.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GCharsetConverter.description" class="shortcut">Description</a>
                   | 
                  <a href="#GCharsetConverter.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GCharsetConverter.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#GCharsetConverter.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="GCharsetConverter"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GCharsetConverter.top_of_page"></a>GCharsetConverter</span></h2>
<p>GCharsetConverter — Convert between charsets</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GCharsetConverter.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gio/gio.h&gt;

                    <a class="link" href="GCharsetConverter.html#GCharsetConverter-struct" title="GCharsetConverter">GCharsetConverter</a>;
<a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> * <a class="link" href="GCharsetConverter.html#g-charset-converter-new" title="g_charset_converter_new ()">g_charset_converter_new</a>             (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *to_charset</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *from_charset</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GCharsetConverter.html#g-charset-converter-set-use-fallback" title="g_charset_converter_set_use_fallback ()">g_charset_converter_set_use_fallback</a>
                                                        (<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_fallback</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GCharsetConverter.html#g-charset-converter-get-use-fallback" title="g_charset_converter_get_use_fallback ()">g_charset_converter_get_use_fallback</a>
                                                        (<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="GCharsetConverter.html#g-charset-converter-get-num-fallbacks" title="g_charset_converter_get_num_fallbacks ()">g_charset_converter_get_num_fallbacks</a>
                                                        (<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GCharsetConverter.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----GCharsetConverter
</pre>
</div>
<div class="refsect1">
<a name="GCharsetConverter.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GCharsetConverter implements
 <a class="link" href="GConverter.html" title="GConverter">GConverter</a> and  <a class="link" href="GInitable.html" title="GInitable">GInitable</a>.</p>
</div>
<div class="refsect1">
<a name="GCharsetConverter.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GCharsetConverter.html#GCharsetConverter--from-charset" title='The "from-charset" property'>from-charset</a>"             <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
  "<a class="link" href="GCharsetConverter.html#GCharsetConverter--to-charset" title='The "to-charset" property'>to-charset</a>"               <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
  "<a class="link" href="GCharsetConverter.html#GCharsetConverter--use-fallback" title='The "use-fallback" property'>use-fallback</a>"             <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct
</pre>
</div>
<div class="refsect1">
<a name="GCharsetConverter.description"></a><h2>Description</h2>
<p>
<a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> is an implementation of <a class="link" href="GConverter.html" title="GConverter"><span class="type">GConverter</span></a> based on
GIConv.
</p>
</div>
<div class="refsect1">
<a name="GCharsetConverter.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GCharsetConverter-struct"></a><h3>GCharsetConverter</h3>
<pre class="programlisting">typedef struct _GCharsetConverter GCharsetConverter;</pre>
<p>
Conversions between character sets.
</p>
</div>
<hr>
<div class="refsect2">
<a name="g-charset-converter-new"></a><h3>g_charset_converter_new ()</h3>
<pre class="programlisting"><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="returnvalue">GCharsetConverter</span></a> * g_charset_converter_new             (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *to_charset</code></em>,
                                                         <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *from_charset</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Creates a new <a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>to_charset</code></em> :</span></p></td>
<td>destination charset</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>from_charset</code></em> :</span></p></td>
<td>source charset</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>
<a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.24</p>
</div>
<hr>
<div class="refsect2">
<a name="g-charset-converter-set-use-fallback"></a><h3>g_charset_converter_set_use_fallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_charset_converter_set_use_fallback
                                                        (<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>,
                                                         <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_fallback</code></em>);</pre>
<p>
Sets the <a class="link" href="GCharsetConverter.html#GCharsetConverter--use-fallback" title='The "use-fallback" property'><span class="type">"use-fallback"</span></a> property.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>converter</code></em> :</span></p></td>
<td>a <a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>use_fallback</code></em> :</span></p></td>
<td>
<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to use fallbacks</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.24</p>
</div>
<hr>
<div class="refsect2">
<a name="g-charset-converter-get-use-fallback"></a><h3>g_charset_converter_get_use_fallback ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_charset_converter_get_use_fallback
                                                        (<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>);</pre>
<p>
Gets the <a class="link" href="GCharsetConverter.html#GCharsetConverter--use-fallback" title='The "use-fallback" property'><span class="type">"use-fallback"</span></a> property.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>converter</code></em> :</span></p></td>
<td>a <a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if fallbacks are used by <em class="parameter"><code>converter</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.24</p>
</div>
<hr>
<div class="refsect2">
<a name="g-charset-converter-get-num-fallbacks"></a><h3>g_charset_converter_get_num_fallbacks ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               g_charset_converter_get_num_fallbacks
                                                        (<em class="parameter"><code><a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a> *converter</code></em>);</pre>
<p>
Gets the number of fallbacks that <em class="parameter"><code>converter</code></em> has applied so far.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>converter</code></em> :</span></p></td>
<td>a <a class="link" href="GCharsetConverter.html" title="GCharsetConverter"><span class="type">GCharsetConverter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of fallbacks that <em class="parameter"><code>converter</code></em> has applied</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.24</p>
</div>
</div>
<div class="refsect1">
<a name="GCharsetConverter.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GCharsetConverter--from-charset"></a><h3>The <code class="literal">"from-charset"</code> property</h3>
<pre class="programlisting">  "from-charset"             <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
<p>The character encoding to convert from.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GCharsetConverter--to-charset"></a><h3>The <code class="literal">"to-charset"</code> property</h3>
<pre class="programlisting">  "to-charset"               <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
<p>The character encoding to convert to.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GCharsetConverter--use-fallback"></a><h3>The <code class="literal">"use-fallback"</code> property</h3>
<pre class="programlisting">  "use-fallback"             <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct</pre>
<p>Use fallback (of form \&lt;hexval&gt;) for invalid bytes.</p>
<p>Default value: FALSE</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>